package com.linsir.lin.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.linsir.lin.dto.GridDTO;
import com.linsir.lin.dto.MetaFieldDTO;
import com.linsir.lin.dto.MetaObjectDTO;
import com.linsir.lin.pojo.MetaField;
import com.linsir.lin.pojo.MetaObject;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * @ProjectName:linsir-lin
 * @Package:com.linsir.lin.service
 * @Title: MetaFieldService
 * @Description: TODO
 * @Create:2021/6/13 0:52 by @author:Linsir
 * @Update:2021/6/13 0:52 by @author:Linsir
 * @UpdateRemark: 初始创建
 * @Version 1.0.0
 */
public interface MetaFieldService {

    /**
     *
     * @param objectCode
     * @return
     */
    List<MetaFieldDTO>  listByObjectCode(String objectCode) throws InvocationTargetException, IllegalAccessException;


    /**
     * 列表
     * @param page
     * @param limit
     * @param searchParams
     * @return
     * @throws IOException
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    GridDTO<MetaFieldDTO> grid(String page,
                               String limit,
                               String searchParams) throws IOException, InvocationTargetException, IllegalAccessException;


    /**
     *  to dto
     * @param metaField
     * @return
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    MetaFieldDTO toDto(MetaField metaField) throws InvocationTargetException, IllegalAccessException;

    /**
     *  to dto list
     * @param metaFieldList
     * @return
     * @throws InvocationTargetException
     * @throws IllegalAccessException
     */
    List<MetaFieldDTO> toDtoList(List<MetaField> metaFieldList) throws InvocationTargetException, IllegalAccessException;


    /**
     *
     * @param queryWrapper
     * @return
     */
    List<MetaField> listByQueryWrapper(QueryWrapper<MetaField> queryWrapper);

    /**
     * 列表页面查询条件的控件
     * @param objectCode
     * @return
     */
    List<MetaFieldDTO> listGridQueryField(String objectCode) throws InvocationTargetException, IllegalAccessException;

}
